function callback_dialog(data)
{
if (!data.success) 
	alert("Cannot find\nlocalisation messages\nfor this application")
else
{
	dialog = data.content.split("\n")
}
}

function callback_interface(data)
{
if (!data.success) 
	alert("Cannot find\nlocalisation messages\nfor this application")
else
{
    var interfaces = data.content.split("\n")
	for (var i = 0 ; i < interfaces.length ; i ++)
		if (svgdoc.getElementById("interface" + i.toString()) != null)
			svgdoc.getElementById("interface" + i.toString()).firstChild.data = interfaces[i] + " "
	getDataFile("localisation/" + language +"/dialog.txt",callback_dialog)
}
}

function callback_tooltip(data)
{
if (!data.success) 
	alert("Cannot find\nlocalisation messages\nfor this application")
else
{
	tooltip_message = data.content.split("\n")
	getDataFile("localisation/" + language +"/menus_cont.txt",callback_menus_cont)
}
}

function callback_popup(data)
{
if (!data.success) 
	alert("Cannot find\nlocalisation messages\nfor this application")
else
{
	popup_message = data.content.split("\n")
	getDataFile("localisation/" + language +"/menus.txt",callback_menus)
}
}

function callback_menus(data)
{
if (!data.success) 
	add_alert("svg/alert.svg","outil","Cannot find\nlocalisation items\nfor menus")
else
{
	var menus_names = data.content.split("\n")
	for (var i = 0; i <= 5; i ++)
	{
		var menus_details = menus_names[i].split(";")
		for (var j = 0 ; j < menus_details.length ; j ++)
			menus[i + 1][j] = menus_details[j]
	}
	make_menus()
	getDataFile("localisation/" + language +"/tooltip.txt",callback_tooltip)
}
}

function callback_menus_cont(data)
{
if (!data.success) 
	add_alert("svg/alert.svg","outil","Cannot find\nlocalisation messages\nfor this application")
else
{
    var interfaces = data.content.split("\n")
	for (var i = 0 ; i < interfaces.length ; i ++)
		if (svgdoc.getElementById("mc" + i.toString()) != null)
		 	svgdoc.getElementById("mc" + i.toString()).firstChild.data = interfaces[i]
//	context_menus('menu_defaut',evt)
	getDataFile("localisation/" + language +"/interface.txt",callback_interface)
}
}
